VtRowColumn
Create a RowColumn widget
Syntax
VtRowColumn object_name [options]
Description
Creates a RowColumn widget. Returns the widget name.
Options
- -horizontal (CS)
- Specifies that the contents of the RowColumn should be arranged
horizontally.
- -numColumns integer (CS)
- Specifies that the RowColumn should arrange its contants in
integer columns.
- -packing NONE | COLUMN | TIGHT (CS)
- Specifies how items contained in a RowColumn widget are packed.
- NONE
- No packing is performed. The x and y attributes of each
entry are left alone, and the RowColumn widget attempts
to become large enough to enclose all entries.
- COLUMN
- All entries are placed in identically sized boxes. The
boxes are based on the largest height and width values of all the
children widgets.
- TIGHT
- Given the current orientation (horizontal or vertical)
entries are placed one after the other until the RowColumn must wrap.
A RowColumn will wrap when there is no room left for a complete child
in that dimension. Wrapping occurs by beginning a new row or column
in the next available space. Wrapping continues as often as
necessary, until all of the children are laid out. In the vertical
dimension (columns), the boxes are set to the same width; in the
horizontal dimension (rows) the boxes are set to the same depth. Each
entry's position in the major dimension is left unaltered; its position
in the minor dimension is set to the same value as the greatest entry
in that particular row or column. The position in the minor dimension
of any particular row or column is independent of all other rows or
columns.
- -spacing integer (CS)
- Specifies the spacing between the RowColumn's contents.
- -vertical (CS)
- Specifies that the contents of the RowColumn should be arranged
vertically.
Example
The following code produces a RowColumn widget containing 6 PushButtons
arranged in 3 columns.
set app [VtOpen PushButtons]
set form [VtFormDialog $app.form -title "VtRowColumn Demo" ]
set rc [VtRowColumn $form.rc -numColumns 3 ]
VtPushButton $rc.but1 -label "Apples"
VtPushButton $rc.but2 -label "Oranges"
VtPushButton $rc.but3 -label "Bananas"
VtPushButton $rc.but4 -label "Kumquats"
VtPushButton $rc.but5 -label "Pears"
VtPushButton $rc.but6 -label "Grapes"
VtShow $form
VtMainLoop
This code produces the following:
See also: